package ttsolver.util;

import java.util.Hashtable;
import java.util.List;

import ttsolver.input.Node;
import ttsolver.input.Track;

public class AlgorithmUtil {
	private List<Node> processedNodes;
	
	public double maxPath(Long init, Hashtable<Long, Node> nodeList,
			Hashtable<Long, Track> trackList) {
		double sizePath = 0;
		
		for (long key = init; key < nodeList.size(); key++) {
			Node currentNode = nodeList.get(key);
			for(Node nextNode : currentNode.getNextNodes()){
				// Obtem track
				Track track = new Track(currentNode, nextNode);
				track = trackList.get(track.key());
				
				sizePath += track.getLength();
				maxPath(nextNode.getId(), nodeList, trackList);
			}
		}
		return sizePath;
	}
}
